import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import center from './routes/center'
import cinema from './routes/cinema'
import film from './routes/film'
Vue.use(VueRouter)

const routes = [
  center,
  cinema,
  film,
  {
    path: '/',
    redirect: '/film/nowplaying'
  },
  {
    path: '/filmdetail/:filmid',
    name: 'filmdetail',
    component: () => import('../views/Detail/Detail.vue')
  },
  {
    path: '/about',
    name: 'About',
    component: () => import('../views/About.vue')
  },
  {
    path: '/zhihu',

    component: () => import('../views/zhihu/zhihu.vue')
  },
  {
    path: '/element',

    component: () => import('../views/element/element.vue')
  },
  {
    path: '/vant',

    component: () => import('../views/element/vant.vue')
  },
  {
    path: '/City',

    component: () => import('../views/City/City')
  },
  {
    path: '/vuex',

    component: () => import('../views/element/vuex.vue')
  },
]

const router = new VueRouter({
  routes
})

export default router
